package com.java2_22;

public class Teacher {
    private String name;
    private int age;
    private static String school = "希望小学";
    public Teacher(){
        //调用同类中其他构造器
        //这样子可以进行初始化
        //this(null,0,"希望小学");
    }

    public Teacher(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static String getSchool() {
        return school;
    }

    public static void setSchool(String school) {
        Teacher.school = school;
    }

    @Override
    public String toString() {
        return name + " " + age + " " + school;
    }
}
